package com.lin.pay.mall.domain.order.service;

import com.lin.pay.mall.domain.order.model.entity.PayOrderEntity;
import com.lin.pay.mall.domain.order.model.entity.ProductEntity;
import com.lin.pay.mall.domain.order.model.entity.ShopCartEntity;

import java.util.List;

public interface IOrderService {
    List<ProductEntity> queryProductList();



    /**
     * 用户下单，通过购物车信息，返回下单后的支付单
     *
     * @param shopCartEntity 简单购物车
     * @return 支付单实体对象
     */
    PayOrderEntity createOrder(ShopCartEntity shopCartEntity) throws Exception;

    /**
     * 改状态支付成功
     * @param orderId
     */
    void changeOrderPaySuccess(String orderId);

    /**
     * 检测未接收到或未正确处理的支付回调通知
     * @return
     */
    List<String> queryNoPayNotifyOrder();

    /**
     * 查询超时订单
     * @return
     */
    List<String> queryTimeoutCloseOrderList();

    /**
     * 关闭超时订单
     * @param orderId
     * @return
     */
    boolean changeOrderClose(String orderId);
}
